
from flask_migrate import Migrate, MigrateCommand

from flask_script import Manager

from info import create_app,db,models

import logging

from info import create_app, db

app=create_app('kf')



manager = Manager(app)

Migrate(app, db)
manager.add_command('db', MigrateCommand)

 # 创建日志记录器，指明日志保存的路径、每个日志文件的最大大小、保存的日志文件个数上限


@app.route('/index')

def index():
    logging.debug('debug')
    logging.info('info')
    logging.warning('warning')
    logging.error('error')
    logging.fatal('fatal')

    return '123'

if __name__ == '__main__':
    # print(app.url_map)
    manager.run()